// 页面路由接口定义
export interface PageRoute {
  path: string
  component: string
  title: string
  name: string
}

// 小程序页面路由配置 - 适配 Taro 路由结构
export const PAGE_ROUTES: PageRoute[] = [
  { path: '/pages/index/index', component: 'Index', title: '首页', name: '首页 / Home' },
  { path: '/pages/test/index', component: 'Test', title: '组件测试', name: '组件测试 / Component Test' },
  // TODO: 根据实际页面添加更多路由
  // { path: '/pages/user/profile', component: 'UserProfile', title: '个人资料', name: '个人资料 / User Profile' },
  // { path: '/pages/order/history', component: 'OrderHistory', title: '订单历史', name: '订单历史 / Order History' },
]

// 主题颜色常量 - 与原始设计保持一致
export const THEME_COLORS = {
  primary: '#22c55e', // primary-500
  primaryLight: '#4ade80', // primary-400
  primaryDark: '#16a34a', // primary-600
  secondary: '#6b7280',
  success: '#22c55e',
  warning: '#f59e0b',
  error: '#ef4444',
  text: {
    primary: '#171717', // neutral-900
    secondary: '#525252', // neutral-600
    disabled: '#737373', // neutral-500
  },
  background: {
    primary: '#ffffff',
    secondary: '#f5f5f5', // neutral-100
    tertiary: '#e5e5e5', // neutral-200
  },
}

// TabBar 项接口定义
export interface TabItem {
  id: string
  label: string
  icon: string
  path: string
}

// TabBar 配置 - 适配小程序底部导航
export const TAB_BAR_ITEMS: TabItem[] = [
  { id: 'home', label: '首页', icon: '🏠', path: '/pages/index/index' },
  { id: 'test', label: '测试', icon: '🧪', path: '/pages/test/index' },
  // TODO: 根据实际需要添加更多 Tab 项
  // { id: 'orders', label: '订单', icon: '📋', path: '/pages/order/index' },
  // { id: 'profile', label: '我的', icon: '👤', path: '/pages/user/index' }
]

// 费用项接口定义
export interface QuotationItem {
  name: string
  price: string
  materials?: {
    key?: string | number
    name: string | number
    price: string | number
  }
}

// 费用项分类接口定义
export interface QuotationCategory {
  category: string
  key?: string | number
  items?: QuotationItem[]
  total: string | number
}

// 费用项分类汇总
export const QUOTATION_CATEGORIES: QuotationCategory[] = [
  {
    category: '基础工程',
    items: [
      { name: '墙面翻新（含环保乳胶漆）', price: '¥12,000' },
      { name: '地面铺设（强化复合地板）', price: '¥8,000' },
    ],
    total: '¥20,000',
  },
  {
    category: '水电改造',
    items: [{ name: '水电改造（国标电线、PPR水管）', price: '¥6,000' }],
    total: '¥6,000',
  },
  {
    category: '材料费',
    items: [
      { name: '厨房墙地面（品牌瓷砖）', price: '¥5,000' },
      { name: '卫生间墙地面（品牌瓷砖）', price: '¥4,500' },
      { name: '基础洁具（箭牌/九牧）', price: '¥3,500' },
    ],
    total: '¥13,000',
  },
  {
    category: '人工及辅材',
    items: [{ name: '人工及辅材费', price: '¥10,000' }],
    total: '¥10,000',
  },
]

// 总费用
export const TOTAL_QUOTATION_AMOUNT = '¥49,000'

export const ADDRESS_OPTIONS = [
  {
    value: '浙江',
    text: '浙江',
    children: [
      {
        value: '杭州',
        text: '杭州',
        disabled: true,
        children: [
          { value: '西湖区', text: '西湖区', disabled: true },
          { value: '余杭区', text: '余杭区' },
        ],
      },
      {
        value: '温州',
        text: '温州',
        children: [
          { value: '鹿城区', text: '鹿城区' },
          { value: '瓯海区', text: '瓯海区' },
        ],
      },
    ],
  },
  {
    value: '湖南',
    text: '湖南',
    disabled: true,
    children: [
      {
        value: '长沙',
        text: '长沙',
        disabled: true,
        children: [
          { value: '西湖区', text: '西湖区' },
          { value: '余杭区', text: '余杭区' },
        ],
      },
      {
        value: '温州',
        text: '温州',
        children: [
          { value: '鹿城区', text: '鹿城区' },
          { value: '瓯海区', text: '瓯海区' },
        ],
      },
    ],
  },
  {
    value: '福建',
    text: '福建',
    children: [
      {
        value: '福州',
        text: '福州',
        children: [
          { value: '鼓楼区', text: '鼓楼区' },
          { value: '台江区', text: '台江区' },
        ],
      },
    ],
  },
]

export const DATE_TIME_OPTIONS = [
  {
    value: '2025-10-12',
    text: '2025-10-12',
    children: [
      { value: '09', text: '09:00-10:00' },
      { value: '10', text: '10:00-11:00' },
      { value: '11', text: '11:00-12:00' },
    ],
  },
  {
    value: '2025-10-13',
    text: '2025-10-13',
    children: [
      { value: '09', text: '09:00-10:00' },
      { value: '10', text: '10:00-11:00' },
    ],
  },
]
